package org.jeecg.config.init;

import org.jeecg.modules.workDaily.service.IWorkDailyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component("taskJob")
public class TaskJob {
    @Autowired
    private IWorkDailyService workDailyService;

    @Scheduled(cron = "0 53 9 * * ?")
    public void job1() {
        workDailyService.task();
    }

    /*@Scheduled(fixedDelay = 1000L)
    public void job2() {
        System.out.println("通过fixedDelay定义的定时任务");
    }

    @Scheduled(fixedRate = 1000L)
    public void job3() {
        System.out.println("通过fixedRate定义的定时任务");
    }*/
}
